import { Modal, Input } from 'antd';
import { connect } from 'react-redux';

function SdkTags(props) {
    const vals = ds => {
        let i = 1;
        return ds.map(x => `${x} ${i++}`).join('\n');
    };
    return <Modal 
        title="Sdk关联点"
        cancelText="关闭"
        okText="复制"
        centered
        closable={false}
        maskClosable={false}
        forceRender={true}
        visible={props.state.isShow}
        onOk={ _ => _ }
        onCancel={_ => _}
        width={1000}>

        <Input.TextArea bordered={false} autoSize={{ minRows: 15, maxRows: 15 }} readOnly value={ vals(props.state.tags) } />
    </Modal>
}

export default connect(
    s => ({ state: s.sdkTags }),
    {  }
)(SdkTags);